import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author: TanJingyu
 * @create: 2022-03-28 11:48
 **/
public class SocketMainTest2 {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket();
        serverSocket.bind(new InetSocketAddress("localhost", 8088));
        Socket accept = serverSocket.accept();
        accept.close();
    }
}

    